package com.party.core.dao.read.gatherForm;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.gatherForm.GatherFormInfo;
import com.party.core.model.member.Member;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface GatherFormInfoReadDao extends BaseReadDao<GatherFormInfo> {

    Integer getMaxIndex(String projectId);

    List<Map<String, Object>> webListPage(@Param(value = "params") Map<String, Object> params, Page page);

    GatherFormInfo getFormInfoByField(@Param(value = "fieldId") String fieldId, @Param(value = "maxIndex") Integer maxIndex);

    /**
     * 查询某机构下的所有登录过的自定义人员收集的人
     * @param partnerId
     * @return
     */
    List<Member> getGatherFormInfoMembersByPartnerId(@Param(value = "partnerId") String partnerId);

    Long getCountById(@Param(value = "projectId") String projectId);

   List<GatherFormInfo> getFormInfoByFieldAndProjectId(@Param(value = "projectId") String projectId,@Param(value = "fieldId") String fieldId);

    List<GatherFormInfo> getFormInfoByMemberId(@Param("memberId") String memberId, @Param("projectId")String projectId);

    String getFormInfoValByMemberGroupId(@Param("memberGroupIds")List<String> memberGroupIds,@Param("params")Map<String,Object> params);
}
